import { request } from "@/utils/service"
import type * as Order from "./types/order"

/** 获取订单列表 */
export function getOrderListApi(params: Order.GetOrderListRequestData) {
  return request<Order.GetOrderListResponseData>({
    url: "/order/page",
    method: "get",
    params
  })
}

/** 获取订单详情 */
export function getOrderDetailApi(orderId: string) {
  return request<Order.GetOrderResponseData>({
    url: `/order/detail/${orderId}`,
    method: "get"
  })
}